From 232356a9ec4aebdf3fd895c6561149e62b859888 Mon Sep 17 00:00:00 2001 From: Hans van Kranenburg Date: Tue, 22 Jan 2019 19:58:32 +0100 Subject: [PATCH] debian/xen-utils-common.*: remove xend cruft xend is obsolete and removed. Still, there are some traces of it in init and other scripts. Remove all of it now. Also remove a migration step about upgrading to 4.1, since we don't support directly upgrading from something older than that to the current package. --- debian/xen-utils-common.README.Debian | 5 -- debian/xen-utils-common.postinst | 2 - debian/xen-utils-common.postrm | 2 - debian/xen-utils-common.preinst | 3 - debian/xen-utils-common.xen.init | 88 +------------------------ debian/xen-utils-common.xend.default | 2 - debian/xen-utils-common.xendomains.init | 9 --- 7 files changed, 1 insertion(+), 110 deletions(-) delete mode 100644 debian/xen-utils-common.xend.default diff --git a/debian/xen-utils-common.README.Debian b/debian/xen-utils-common.README.Debian index 873a9d3fc9..b312a7f27c 100644 --- a/debian/xen-utils-common.README.Debian +++ b/debian/xen-utils-common.README.Debian @@ -22,8 +22,3 @@ differs from the upstream version, which overwrites the main network card To setup a bridge please follow the instructions in the manpage for bridge-utils-interfaces(5). - -You can also change the /etc/xen/xend-config.sxp file and re-enable the Xen -included network setup by adding - (network-script network-bridge) -to the file. But please note that this may or may not work. diff --git a/debian/xen-utils-common.postinst b/debian/xen-utils-common.postinst index f719731aff..c77dff087a 100644 --- a/debian/xen-utils-common.postinst +++ b/debian/xen-utils-common.postinst @@ -16,8 +16,6 @@ abort-upgrade|abort-remove|abort-deconfigure) ;; esac -dpkg-maintscript-helper mv_conffile /etc/init.d/xend /etc/init.d/xen 4.1.2-4~ -- "$@" - #DEBHELPER# exit 0 diff --git a/debian/xen-utils-common.postrm b/debian/xen-utils-common.postrm index 48b57ead0c..c96620cd40 100644 --- a/debian/xen-utils-common.postrm +++ b/debian/xen-utils-common.postrm @@ -16,8 +16,6 @@ remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; esac -dpkg-maintscript-helper mv_conffile /etc/init.d/xend /etc/init.d/xen 4.1.2-4~ -- "$@" - #DEBHELPER# exit 0 diff --git a/debian/xen-utils-common.preinst b/debian/xen-utils-common.preinst index 5f9c729374..7e9a51b975 100644 --- a/debian/xen-utils-common.preinst +++ b/debian/xen-utils-common.preinst @@ -15,9 +15,6 @@ abort-upgrade) ;; esac -dpkg-maintscript-helper mv_conffile /etc/init.d/xend /etc/init.d/xen 4.1.2-4~ -- "$@" -update-rc.d -f xend remove >/dev/null - #DEBHELPER# exit 0 diff --git a/debian/xen-utils-common.xen.init b/debian/xen-utils-common.xen.init index 3411c15b0f..4b793d5ac2 100644 --- a/debian/xen-utils-common.xen.init +++ b/debian/xen-utils-common.xen.init @@ -1,6 +1,6 @@ #!/bin/sh ### BEGIN INIT INFO -# Provides: xen xend +# Provides: xen # Required-Start: $syslog $remote_fs # Required-Stop: $syslog $remote_fs # Default-Start: 2 3 4 5 @@ -16,7 +16,6 @@ XENSTORED_DIR="/var/run/xenstored" [ -r /etc/default/xen ] && . /etc/default/xen -[ -r /etc/default/xend ] && . /etc/default/xend PATH=/sbin:/bin:/usr/sbin:/usr/bin DESC="Xen daemons" @@ -26,13 +25,7 @@ if [ $? -ne 0 ]; then log_warning_msg "Not running within Xen or no compatible utils" exit 0 fi -TOOLSTACK=$(/usr/lib/xen-common/bin/xen-toolstack 2>/dev/null) -if [ $? -ne 0 ]; then - log_warning_msg "No usable Xen toolstack selected" - exit 0 -fi -[ -e "$ROOT"/bin/xend ] && XEND="$ROOT"/bin/xend XENCONSOLED="$ROOT"/bin/xenconsoled XENCONSOLED_PIDFILE="/var/run/xenconsoled.pid" XENSTORED="$ROOT"/bin/xenstored @@ -72,70 +65,6 @@ env_setup() [ -x /sbin/restorecon ] && /sbin/restorecon /run/xen } -xend_start() -{ - if [ -z "$XEND" ] || [ "$(basename "$TOOLSTACK")" != xm ]; then - return 0 - fi - - log_progress_msg "xend" - xend_start_real - return $? -} - -xend_stop() -{ - if [ -z "$XEND" ] || [ "$(basename "$TOOLSTACK")" != xm ]; then - return 0 - fi - - log_progress_msg "xend" - xend_stop_real - return $? -} - -xend_restart() -{ - if [ -z "$XEND" ] || [ "$(basename "$TOOLSTACK")" != xm ]; then - return 0 - fi - - log_progress_msg "xend" - xend_stop_real - case "$?" in - 0|1) - xend_start_real - case "$?" in - 0) ;; - *) return 2 ;; - esac - ;; - *) return 2 ;; - esac - return 0 -} - -xend_start_real() -{ - $XEND status && return 1 - $XEND start || return 2 - - i=0 - while [ $i -lt 10 ]; do - $XEND status && return 0 || true - i=$(($i + 1)) - sleep 1 - done - return 2 -} - -xend_stop_real() -{ - log_progress_msg "xend" - $XEND status || return 0 - $XEND stop || return 1 -} - xenconsoled_start() { log_progress_msg "xenconsoled" @@ -302,11 +231,6 @@ case "$1" in 0|1) ;; *) log_end_msg 1; exit ;; esac - xend_start - case "$?" in - 0|1) ;; - *) log_end_msg 1; exit ;; - esac init_dom0 case "$?" in 0|1) ;; @@ -332,11 +256,6 @@ case "$1" in 0|1) ;; *) ret=1 ;; esac - xend_stop - case "$?" in - 0|1) ;; - *) ret=1 ;; - esac xenconsoled_stop case "$?" in 0|1) ;; @@ -357,11 +276,6 @@ case "$1" in 0|1) ;; *) ret=1 ;; esac - xend_restart - case "$?" in - 0|1) ;; - *) ret=1 ;; - esac xenconsoled_restart case "$?" in 0|1) ;; diff --git a/debian/xen-utils-common.xend.default b/debian/xen-utils-common.xend.default deleted file mode 100644 index 589da356ad..0000000000 --- a/debian/xen-utils-common.xend.default +++ /dev/null @@ -1,2 +0,0 @@ -XENCONSOLED_ARGS= -XENSTORED_ARGS= diff --git a/debian/xen-utils-common.xendomains.init b/debian/xen-utils-common.xendomains.init index e1164b21bb..36d23f722b 100644 --- a/debian/xen-utils-common.xendomains.init +++ b/debian/xen-utils-common.xendomains.init @@ -23,15 +23,6 @@ then exit 0; fi -TOOLSTACK=$(/usr/lib/xen-common/bin/xen-toolstack 2>/dev/null) -if [ $? -ne 0 ]; then - log_warning_msg "No usable Xen toolstack selected" - exit 0 -fi -if [ "$(basename "$TOOLSTACK")" != xm ] && [ "$(basename "$TOOLSTACK")" != xl ]; then - exit 0 -fi - if ! [ -e /proc/xen/privcmd ]; then exit 0 fi -- 2.30.2